<HTML>
<HEAD>
<TITLE>[Chapter 19] Scrollbar</TITLE>
<META NAME="author" CONTENT="John Zukowski">
<META NAME="date" CONTENT="Thu Jul 31 15:15:59 1997">
<META NAME="form" CONTENT="html">
<META NAME="metadata" CONTENT="dublincore.0.1">
<META NAME="objecttype" CONTENT="book part">
<META NAME="otheragent" CONTENT="gmat dbtohtml">
<META NAME="publisher" CONTENT="O'Reilly &amp; Associates, Inc.">
<META NAME="source" CONTENT="SGML">
<META NAME="subject" CONTENT="Java AWT">
<META NAME="title" CONTENT="Java AWT">
<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">
</HEAD>
<body vlink="#551a8b" alink="#ff0000" text="#000000" bgcolor="#FFFFFF" link="#0000ee">

<DIV CLASS=htmlnav>
<H1><a href='index.htm'><IMG SRC="gifs/smbanner.gif"
     ALT="Java AWT" border=0></a></H1>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch19_53.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><B><FONT FACE="ARIEL,HELVETICA,HELV,SANSERIF" SIZE="-1">Chapter 19<br>java.awt Reference</FONT></B></TD>
<td width=172 align=right valign=top><A HREF="ch19_55.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
</table>

&nbsp;
<hr align=left width=515>
</DIV>
<DIV CLASS=refnamediv>
<H1>Scrollbar</H1>

<H2>Name</H2>

Scrollbar

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch19-REFSECT1-AUTOID.54"></A></h2>
</DIV>


<p>
<img align=middle src="./figs/scroll3.gif" alt="[Graphic: Figure from the text]" width=502 height=52 border=0>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-1">Description</A></h2>

<P CLASS=para>
The <tt CLASS=literal>Scrollbar</tt> is a <tt CLASS=literal>Component</tt> 
that provides the means to get and set values within a predetermined range. 
For example, a scrollbar could be used for a volume control. Scrollbars 
are most frequently used to help users manipulate areas too large to be 
displayed on the screen (pre version 1.1) or to set a value within an integer 
range. 

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-2">Class Definition</A></h2>

<DIV CLASS=screen>
<P>
<PRE>
public class java.awt.Scrollbar
    extends java.awt.Component
    implements java.awt.Adjustable {
  
  // Constants
  public final static int HORIZONTAL;
  public final static int VERTICAL;
  
  // Constructors
  public Scrollbar();
  public Scrollbar (int orientation);
  public Scrollbar (int orientation, int value, int visible, int minimum, 
    int maximum);
  
  // Instance Methods
  public void addAdjustmentListener (AdjustmentListener l); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public void addNotify();
  public int getBlockIncrement(); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public int getLineIncrement(); <img src="gifs/wstar.gif" alt="(Deprecated)" border=0>
  public int getMaximum();
  public int getMinimum();
  public int getOrientation();
  public int getPageIncrement(); <img src="gifs/wstar.gif" alt="(Deprecated)" border=0>
  public int getUnitIncrement(); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public int getValue();
  public int getVisible(); <img src="gifs/wstar.gif" alt="(Deprecated)" border=0>
  public int getVisibleAmount(); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public void removeAdjustmentListener (AdjustmentListener l); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public synchronized void setBlockIncrement (int v); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public void setLineIncrement (int amount); <img src="gifs/wstar.gif" alt="(Deprecated)" border=0>
  public synchronized void setMaximum (int newMaximum); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public synchronized void setMinimum (int newMinimum); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public synchronized void setOrientation (int orientation); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public void setPageIncrement (int amount); <img src="gifs/wstar.gif" alt="(Deprecated)" border=0>
  public synchronized void setUnitIncrement(int v); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public synchronized void setValue (int value);
  public synchronized void setValues (int value, int visible, 
    int minimum, int maximum);
  public synchronized void setVisibleAmount (int newAmount); <img src="gifs/bstar.gif" alt="(New)" border=0>
  
  // Protected Instance Methods
  protected String paramString();
  protected void processAdjustmentEvent (AdjustmentEvent e); <img src="gifs/bstar.gif" alt="(New)" border=0>
  protected void processEvent (AWTEvent e); <img src="gifs/bstar.gif" alt="(New)" border=0>
}
</PRE>
</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-3">Constants</A></h2>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-3.1">HORIZONTAL</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-3.1.1">public final static int HORIZONTAL</A></h4>

<P CLASS=para>
Constant used for a <tt CLASS=literal>Scrollbar</tt> 
with a horizontal orientation. 

</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-3.2">VERTICAL</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-3.2.1">public final static int VERTICAL</A></h4>

<P CLASS=para>
Constant used for a <tt CLASS=literal>Scrollbar</tt> 
with a vertical orientation. 

</DIV>

</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-4">Constructors</A></h2>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-4.1">Scrollbar</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-4.1.1">public Scrollbar()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Constructs a vertical <tt CLASS=literal>Scrollbar</tt> 
object; slider size, minimum value, maximum value, and initial value are 
all zero. </DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-4.1.2">public Scrollbar (int orientation)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>orientation</I><br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Scrollbar</tt> 
constant designating direction. </DL>
<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>IllegalArgumentException</I><br>
<DD>

<P CLASS=para>
If 
<tt CLASS=literal>orientation</tt> is invalid. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Constructs a <tt CLASS=literal>Scrollbar</tt> object, 
in the designated direction; slider size, minimum value, maximum value, 
and initial value are all zero. </DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-4.1.3">public Scrollbar (int orientation, int value, int visible, int minimum, int maximum)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters <br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>orientation</I><br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Scrollbar</tt> 
constant designating direction. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>value</I><br>
<DD>

<P CLASS=para>
Initial value of <tt CLASS=literal>Scrollbar</tt>. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>visible</I><br>
<DD>

<P CLASS=para>
Initial slider size. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>minimum</I><br>
<DD>

<P CLASS=para>
Initial minimum value. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>maximum</I><br>
<DD>

<P CLASS=para>
Initial maximum value. </DL>
<p>
<DT CLASS=varlistentry>Throws <br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>IllegalArgumentException</I><br>
<DD>

<P CLASS=para>
If 
<tt CLASS=literal>orientation</tt> is invalid. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Constructs a <tt CLASS=literal>Scrollbar</tt> object 
with the given values. </DL>
</DIV>

</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5">Instance Methods</A></h2>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.1">addAdjustmentListener</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.1.1">public void addAdjustmentListener (AdjustmentListener l) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters <br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>l</I><br>
<DD>

<P CLASS=para>
An object that implements the <tt CLASS=literal>AdjustmentListener</tt> 
interface. </DL>
<p>
<DT CLASS=varlistentry>Implements <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Adjustable.addAdjustmentListener()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Add a listener for adjustment event. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.2">addNotify</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.2.1">public void addNotify()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Overrides <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.addNotify()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Creates <tt CLASS=literal>Scrollbar</tt>'s peer. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.3">getBlockIncrement</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.3.1">public int getBlockIncrement() <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Implements <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Adjustable.getBlockIncrement()</tt> 

<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The amount to scroll when a paging area is selected. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.4">getLineIncrement</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.4.1">public int getLineIncrement() <img src="gifs/wstar.gif" alt="(Deprecated)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The amount to scroll when one of the arrows at the ends of the scrollbar 
is selected. Replaced by <tt CLASS=literal>getUnitIncrement()</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.5">getMaximum</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.5.1">public int getMaximum()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Implements <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Adjustable.getMaximum()</tt> 

<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The maximum value that the <tt CLASS=literal>Scrollbar</tt> 
can take. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.6">getMinimum</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.6.1">public int getMinimum()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Implements <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Adjustable.getMinimum()</tt> 

<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The minimum value that the <tt CLASS=literal>Scrollbar</tt> 
can take. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.7">getOrientation</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.7.1">public int getOrientation()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Implements <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Adjustable.getOrientation()</tt> 

<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
A constant representing the direction of the <tt CLASS=literal>Scrollbar</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.8">getPageIncrement</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.8.1">public int getPageIncrement() <img src="gifs/wstar.gif" alt="(Deprecated)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The amount to scroll when a paging area is selected. Replaced with <tt CLASS=literal>getBlockIncrement()</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.9">getUnitIncrement</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.9.1">public int getUnitIncrement() <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Implements <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Adjustable.getUnitIncrement()</tt> 

<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The amount to scroll when one of the arrows at the ends of the scrollbar 
is selected. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.10">getValue</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.10.1">public int getValue()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Implements <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Adjustable.getValue()</tt> 

<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The current setting for the <tt CLASS=literal>Scrollbar</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.11">getVisible</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.11.1">public int getVisible() <img src="gifs/wstar.gif" alt="(Deprecated)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The current visible setting (i.e., size) for the slider. Replaced by <tt CLASS=literal>getVisibleAmount()</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.12">getVisibleAmount</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.12.1">public int getVisibleAmount() <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Implements <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Adjustable.getVisibleAmount()</tt> 

<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The current visible setting (i.e., size) for the slider. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.13">removeAdjustmentListener</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.13.1">public void removeAdjustmentListener (AdjustmentListener l) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters <br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>l</I><br>
<DD>

<P CLASS=para>
One of this <tt CLASS=literal>Scrollbar</tt>'s 
<tt CLASS=literal>AdjustmentListener</tt>s. </DL>
<p>
<DT CLASS=varlistentry>Implements <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Adjustable.removeAdjustmentListener()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Remove an adjustment event listener. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.14">setBlockIncrement</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.14.1">public synchronized void setBlockIncrement (int amount) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters <br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>amount</I><br>
<DD>

<P CLASS=para>
New paging increment amount. </DL>
<p>
<DT CLASS=varlistentry>Implements <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Adjustable.setBlockIncrement()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Changes the block increment amount for the <tt CLASS=literal>Scrollbar</tt>; 
the default block increment is 10. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.15">setLineIncrement</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.15.1">public void setLineIncrement (int amount) <img src="gifs/wstar.gif" alt="(Deprecated)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters <br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>amount</I><br>
<DD>

<P CLASS=para>
New line increment amount. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Changes the line increment amount for the <tt CLASS=literal>Scrollbar</tt>. 
The default line increment is 1. Replaced by <tt CLASS=literal>setUnitIncrement(int)</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.16">setMaximum</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.16.1">public synchronized void setMaximum (int newMaximum) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters <br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>newMaximum</I><br>
<DD>

<P CLASS=para>
New maximum value. </DL>
<p>
<DT CLASS=varlistentry>Implements <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Adjustable.setMaximum()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Changes the maximum value for the <tt CLASS=literal>Scrollbar</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.17">setMinimum</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.17.1">public synchronized void setMinimum (int newMinimum) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters <br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>newMinimum</I><br>
<DD>

<P CLASS=para>
New minimum value. </DL>
<p>
<DT CLASS=varlistentry>Implements <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Adjustable.setMinimum()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Changes the minimum value for the <tt CLASS=literal>Scrollbar</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.18">setOrientation</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.18.1">public synchronized void setOrientation (int orientation) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters <br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>orientation</I><br>
<DD>

<P CLASS=para>
One of the orientation constants <tt CLASS=literal>HORIZONTAL</tt> 
or <tt CLASS=literal>VERTICAL</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Changes the orientation of the <tt CLASS=literal>Scrollbar</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.19">setPageIncrement</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.19.1">public void setPageIncrement (int amount) <img src="gifs/wstar.gif" alt="(Deprecated)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters <br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>amount</I><br>
<DD>

<P CLASS=para>
New paging increment amount. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Changes the paging increment amount for the <tt CLASS=literal>Scrollbar</tt>; 
the default page increment is 10. Replaced by <tt CLASS=literal>setBlockIncrement(int)</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.20">setUnitIncrement</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.20.1">public synchronized void setUnitIncrement (int amount) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters <br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>amount</I><br>
<DD>

<P CLASS=para>
New line increment amount. </DL>
<p>
<DT CLASS=varlistentry>Implements <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Adjustable.setUnitIncrement()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Changes the unit increment amount for the <tt CLASS=literal>Scrollbar</tt>. 
The default unit increment is 1. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.21">setValue</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.21.1">public synchronized void setValue (int value)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters <br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>value</I><br>
<DD>

<P CLASS=para>
New <tt CLASS=literal>Scrollbar</tt> 
value. </DL>
<p>
<DT CLASS=varlistentry>Implements <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Adjustable.setValue()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Changes the current value of the <tt CLASS=literal>Scrollbar</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.22">setValues</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.22.1">public synchronized void setValues (int value, int visible, int minimum, int maximum)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters <br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>value</I><br>
<DD>

<P CLASS=para>
New <tt CLASS=literal>Scrollbar</tt> 
value. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>visible</I><br>
<DD>

<P CLASS=para>
New slider width. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>minimum</I><br>
<DD>

<P CLASS=para>
New minimum value for <tt CLASS=literal>Scrollbar</tt>. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>maximum</I><br>
<DD>

<P CLASS=para>
New maximum value for <tt CLASS=literal>Scrollbar</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Changes the settings of the <tt CLASS=literal>Scrollbar</tt> 
to the given amounts. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.23">setVisibleAmount</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-5.23.1">public synchronized void setVisibleAmount (int newAmount) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters <br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>newAmount</I><br>
<DD>

<P CLASS=para>
New amount visible. </DL>
<p>
<DT CLASS=varlistentry>Implements <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Adjustable.setVisibleAmount()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Changes the current visible amount of the <tt CLASS=literal>Scrollbar</tt>. </DL>
</DIV>

</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-6">Protected Instance Methods</A></h2>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-6.1">paramString</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-6.1.1">protected String paramString()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
String with current settings of <tt CLASS=literal>Scrollbar</tt>. 

<p>
<DT CLASS=varlistentry>Overrides <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Component.paramString()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Helper method for <tt CLASS=literal>toString()</tt> 
to generate string of current settings. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-6.2">processAdjustmentEvent</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-6.2.1">protected void processAdjustmentEvent (AdjustmentEvent e) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters <br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>e</I><br>
<DD>

<P CLASS=para>
The adjustment event to process. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Adjustment events are passed to this method for processing. Normally, this 
method is called by <tt CLASS=literal>processEvent()</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-6.3">processEvent</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-6.3.1">protected void processEvent (AWTEvent e) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters <br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>e</I><br>
<DD>

<P CLASS=para>
The event to process. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Low level <tt CLASS=literal>AWTEvent</tt>s are passed 
to this method for processing. </DL>
</DIV>

</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="JAWT-CH-19-REF-SCROLLBAR-SECT-7">See Also</A></h2>

<P CLASS=para>
<tt CLASS=literal>Adjustable</tt>, <tt CLASS=literal>Component</tt>, 
<tt CLASS=literal>String</tt> 

</DIV>


<DIV CLASS=htmlnav>

<P>
<HR align=left width=515>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch19_53.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><a href="index.htm"><img src='gifs/txthome.gif' border=0 alt='Home'></a></td>
<td width=172 align=right valign=top><A HREF="ch19_55.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
<tr>
<td width=172 align=left valign=top>ScrollPane <img src="gifs/bstar.gif" alt="(New)" border=0></td>
<td width=171 align=center valign=top><a href="index/idx_a.htm"><img src='gifs/index.gif' alt='Book Index' border=0></a></td>
<td width=172 align=right valign=top>Shape <img src="gifs/bstar.gif" alt="(New)" border=0></td>
</tr>
</table>
<hr align=left width=515>

<IMG SRC="gifs/smnavbar.gif" USEMAP="#map" BORDER=0> 
<MAP NAME="map"> 
<AREA SHAPE=RECT COORDS="0,0,108,15" HREF="../javanut/index.htm"
alt="Java in a Nutshell"> 
<AREA SHAPE=RECT COORDS="109,0,200,15" HREF="../langref/index.htm" 
alt="Java Language Reference"> 
<AREA SHAPE=RECT COORDS="203,0,290,15" HREF="../awt/index.htm" 
alt="Java AWT"> 
<AREA SHAPE=RECT COORDS="291,0,419,15" HREF="../fclass/index.htm" 
alt="Java Fundamental Classes"> 
<AREA SHAPE=RECT COORDS="421,0,514,15" HREF="../exp/index.htm" 
alt="Exploring Java"> 
</MAP>
</DIV>

</BODY>
</HTML>
